<% @page_title = "多背一公斤 | 探访过的学校" %>

<% content_for(:sidebar) do %>
	<h3 class="note">每月已认证的学校</h3>
  <% School.archives.each do |month| %>
		<a href="/schools/date/<%= "#{month[:year]}/#{"%02i" % month[:month]}" %>">
			<%= month[:name] %>
		</a>
		<em>（<%= month[:school_count] %>所学校）</em> <br />
  <% end %>
<% end -%>

<table border="0" cellspacing="0" cellpadding="2" width="98%" class="left ol">
  <tr>
    <th>校名</th>
    <th>提交者</th>
    <th>最后更新日期</th>
  </tr>
  <% @schools.each do |school| %>
    <tr class="<%= cycle('odd', 'even') %>">
      <td width="60%"><%= link_to school.title, school_path(school.id) %></td>
      <td width="20%"><%= link_to school.submitor.login, user_path(school.submitor.id) %></td>
      <td><span class="tip"><%= show_date school.updated_at %></span></td>
    </tr>
  <% end %>
</table>